#include "iostream"
#include "vector"
#include "algorithm"

using namespace std;

/*
 仿函数 返回值类型是bool数据类型，称为谓词
 接收一个参数叫一元谓词
 */

class GreaterFive {
public:
    bool operator()(int val) {
        return val > 5;
    }
};

void test01() {
   vector<int> v;
    for (int i = 0; i < 10; ++i) {
        v.push_back(i);
    }

    vector<int>::iterator iter = find_if(v.begin(), v.end(), GreaterFive());


    cout << *iter << endl;
}


int main() {
    test01();
}